package com.xjtu.project.mapper;
import com.xjtu.project.model.domain.Log;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface OperateLogMapper {
    
    //插入日志数据
    @Insert("insert into log (operateEmpId, operateTime, className, methodName, methodParms, costTime) " +
            "values (#{operateEmpId}, #{operateTime}, #{className}, #{methodName}, #{methodParms}, #{costTime});")
     void insert(Log log);
    //查询日志数据
    @Select("select l.*,e.employeeName as operateEmpName from log l join employee e on e.id=l.operateEmpId")
    List<Log> findAll();
}
